The bulk of customization can be done via the following hooks:
ediff-load-hookediff-before-setup-hookediff-keymap-setup-hookediff-mode-map.
These hooks are run right after the default bindings are set
but before ediff-load-hook. The regular user needs
not be concerned with this hook—it is provided for
implementors of other Emacs packages built on top of
Ediff.ediff-before-setup-windows-hookediff-after-setup-windows-hookediff-suspend-hookediff-quit-hookBy default, ediff-quit-hook holds one hook
function, ediff-cleanup-mess, which cleans after
Ediff, as appropriate in most cases. You probably won't want
to change it, but you might want to add other hook
functions.
Keep in mind that hooks executing before
ediff-cleanup-mess start in
ediff-control-buffer; they should also leave
ediff-control-buffer as the current buffer when
they finish. Hooks that are executed after
ediff-cleanup-mess should expect the current
buffer be either buffer A or buffer B.
ediff-cleanup-mess doesn't kill the buffers
being compared or merged (see
ediff-cleanup-hook, below).
ediff-cleanup-hookediff-quit-hook. This is a good
place to do various cleanups, such as deleting the variant
buffers. Ediff provides a function,
ediff-janitor, as one such possible hook, which
you can add to ediff-cleanup-hook with
add-hooks.
This function kills buffers
A, B, and, possibly, C, if these buffers aren't modified. In
merge jobs, buffer C is never deleted. However, the side
effect of using this function is that you may not be able to
compare the same buffer in two separate Ediff sessions:
quitting one of them will delete this buffer in another
session as well.
ediff-quit-merge-hookediff-maybe-save-and-delete-merge, which
is a function that attempts to save the merge buffer according
to the value of ediff-autostore-merges, as
described later.ediff-before-setup-control-frame-hookediff-after-setup-control-frame-hookediff-control-buffer), which requires special
care in writing these hooks. Take a look at
ediff-default-suspend-hook and
ediff-default-quit-hook to see what's
involved.ediff-startup-hookediff-select-hookediff-unselect-hookediff-prepare-buffer-hookediff-display-help-hookediff-mode-hookediff-registry-setup-hookediff-before-session-group-setup-hookediff-after-session-group-setup-hookediff-quit-session-group-hookediff-meta-buffer-keymap-setup-hookediff-meta-buffer-map
— the map that controls key bindings in the meta buffer.
Since ediff-meta-buffer-map is a local variable,
you can set different bindings for different kinds of meta
buffers.